<template>
  <div class="title">
    <Banner />
    <button @click="back">后退</button>
    <button @click="forward">前进</button>
    <router-link replace active-class="active" :to="{name:'xuesheng'}">学生</router-link>
    <router-link replace active-class="active" to="/Teacher">教师</router-link>
    <router-view></router-view>
  </div>
</template>

<script>
import Banner from "./components/Banner.vue"

export default {
  components:{ Banner },
  name: 'App',
  methods:{
    back(){
      this.$router.back()
    },
    forward(){
      this.$router.forward()
    }
  }
}
</script>

<style scoped>
.active {
  background-color: tomato;
}
</style>